﻿/**
 *       Project: ServerLib
 *     Copyright: Copyright (C) 2008, Rob Kennedy
 *   Create Date: 2008-07-14 10:16 PM
 * Modified Date: 2008-07-14 10:16 PM    RK  Added comments
 *      Comments: Ignore SA1633.
 *      
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

namespace ServerLib.Network.Dns
{
    using System;
    using System.Collections.Generic;

    /// --------------------------------------------------------------------
    /// Project	 : ServerLib
    /// Class	 : MXHost
    /// Inherits : None.
    /// --------------------------------------------------------------------
    /// <summary>
    /// Dns MX host record class used as a MX host reference for a particular
    /// domain.
    /// </summary>
    /// <authorname>Rob Kennedy</authorname>
    /// <remarks></remarks>
    /// --------------------------------------------------------------------
    [Serializable]
    public class MXHost
    {
        #region Private Properties

        /// <summary>Contains the MX server host domain name</summary>
        private string hostName;

        /// <summary>Contains the local domain status of the MX host</summary>
        private bool domainIsLocal;

        /// <summary>Contains a list collection of optional MX hosts for this host</summary>
        private List<string> optionalHosts = new List<string>();

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets or sets the MX host domain name 
        /// </summary>
        public string HostName
        {
            get
            {
                return this.hostName;
            }

            set
            {
                this.hostName = value;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether the MX host is a local domain 
        /// to the current server
        /// </summary>
        public bool IsLocal
        {
            get
            {
                return this.domainIsLocal;
            }

            set
            {
                this.domainIsLocal = value;
            }
        }

        /// <summary>
        /// Gets the optional hosts for the mx host
        /// </summary>
        public List<string> OptionalHosts
        {
            get
            {
                return this.optionalHosts;
            }
        }
        #endregion
    }
}